package com.noahplat.fourg.mapper;

import com.noahplat.datapro.pojo.Dstatus;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/**
 * 功能：设备状态mapper
 * name：宋彦磊
 * time：2021.02.25
 */

public interface DstatusMapper extends Mapper<Dstatus> {
    @Insert("INSERT INTO dstatus VALUES (#{ts}, #{imei}, #{status}, #{model}, #{type}, #{prod})")
    int insertImei(Dstatus dstatus);
    @Select("SELECT imei as imei,status as status,type as type,prod as prod,model as model,ts as ts FROM dstatus WHERE imei=#{imei}")
    Dstatus selectImei(@Param("imei") String imei);
}
